package com.jp.knowledge.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.jp.knowledge.R;
import com.jp.knowledge.model.FoundItem;

import java.util.List;

/**
 * 竞品发现 各类型订阅入口
 *
 */
public class FoundGridAdapter extends JPBaseAdpter {

    public FoundGridAdapter(Context context, List infos) {
        super(context, infos);
    }

    @Override
    protected int getLayoutId(int position) {
        return R.layout.item_found;
    }
    @Override
    protected void renderData(JPViewHolder holder, Object item, int position) {

        FoundItem info = (FoundItem) item;
        ImageView imageView = holder.getView(R.id.home_found_iv_item);
        imageView.setImageResource(info.getResId());
        holder.setText(R.id.home_found_tv_item, info.getName());
    }
}